import React, { Component } from 'react';
import './App.css';
import { Window, TitleBar, Text, Button } from 'react-desktop/macOs';

class App extends Component {

  close = () => window.close();

  constructor(props) {
    super(props);
    this.state = { isMaximized: true};
  }
  
  toggleFullScreen = () => window.setFullScreen(true)
  render() {
    return (
      <Window
        chrome
        height="600px"
        padding="10px"
        >
        <TitleBar 
          title="云飞" 
          controls
          onCloseClick={this.close}
          onMinimizeClick={this.minimize}
          onMaximizeClick={this.toggleFullScreen}
        />
        <Text>云飞商务系统</Text>
        <Button id="button_test" color="blue" onClick={() => console.log("Clicked")}>
          Test
        </Button>
      </Window>
    );
  }
}
export default App;